package com.iflytek.uoamp.agent.core.sender.monitorsender.requestObj;

public enum Method {
	POST, GET,POST_DES,POST_DES_1_4,POST_XOR,POST_DES_1_4_UP,POST_XOR_UP,POST_DES_GZIP,GET_PHONE,CHECKLOCAL,CHECKLIB;
	
	public static String caseToString(Method item) {
		if (item == Method.POST)
			return "post";
		else if (item == Method.POST_DES)
			return "post_des";
		else if (item == Method.POST_DES_1_4)
			return "post_des_1_4";
		else if (item == Method.POST_XOR)
			return "post_xor";
		else if (item == Method.POST_DES_1_4_UP)
			return "post_des_1_4_up";
		else if (item == Method.POST_XOR_UP)
			return "post_xor_up";
		else if (item == Method.POST_DES_GZIP)
			return "post_des_gzip";
		else if (item == Method.GET_PHONE)
			return "get_phone";
		else if (item == Method.CHECKLOCAL)
			return "checklocal";
		else if (item == Method.CHECKLIB)
			return "checklib";
		else
			return "get";
	}

	public static Method caseToObject(String str) {

		if (str.equals("post")) {
			return (Method.POST);
		}else if (str.equals("post_des")) {
			return (Method.POST_DES);
		}else if (str.equals("post_des_1_4")) {
			return (Method.POST_DES_1_4);
		}else if (str.equals("post_xor")) {
			return (Method.POST_XOR);
		}else if (str.equals("post_xor_up")) {
			return (Method.POST_XOR_UP);
		}else if (str.equals("post_des_1_4_up")) {
			return (Method.POST_DES_1_4_UP);
		}else if(str.equals("post_des_gzip")){
			return (Method.POST_DES_GZIP);
		}else if(str.equals("get_phone")) {
			return Method.GET_PHONE;
		}else if (str.equals("checklocal")){
			return Method.CHECKLOCAL;
		}else if (str.equals("checklib")){
			return Method.CHECKLIB;
		}else {
			return (Method.GET);
		}
	}
	
}
